<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Logboard  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a title="Logboard  Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="index.html">Logboard 2.2.1 Docs</a> (3% documented)</p>
        <p class="header-right">
          <form role="search" action="search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="index.html">Logboard Reference</a>
        <img id="carat" src="img/carat.png" />
        Logboard  Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/ConsoleAppender.html">ConsoleAppender</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Logboard.html">Logboard</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Logboard/Level.html">– Level</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Logboard/Data.html">– Data</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/MultiAppender.html">MultiAppender</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/NullAppender.html">NullAppender</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/SocketAppender.html">SocketAppender</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Protocols/LogboardAppender.html">LogboardAppender</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            
            <h1 id='logboard' class='heading'>Logboard</h1>

<p><a href="http://cocoapods.org/pods/Logboard"><img src="https://img.shields.io/cocoapods/p/Logboard.svg?style=flat" alt="Platform"></a>
<img src="https://img.shields.io/badge/language-Swift%205.3-orange.svg" alt="Language">
<a href="http://cocoapods.org/pods/Logboard"><img src="https://img.shields.io/cocoapods/v/Logboard.svg?style=flat" alt="CocoaPods"></a>
<a href="https://github.com/shogo4405/Logboard/blob/master/LICENSE.md"><img src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg" alt="GitHub license"></a></p>

<p>Simple logging framework for your framework project.</p>
<h2 id='usage' class='heading'>Usage</h2>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">logger</span> <span class="o">=</span> <span class="kt">Logboard</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="s">"identifier"</span><span class="p">)</span>

<span class="n">logger</span><span class="o">.</span><span class="n">level</span> <span class="o">=</span> <span class="o">.</span><span class="n">trace</span>
<span class="n">logger</span><span class="o">.</span><span class="nf">trace</span><span class="p">(</span><span class="s">"trace"</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="nf">debug</span><span class="p">(</span><span class="s">"debug"</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="nf">info</span><span class="p">(</span><span class="s">"hoge"</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="nf">warn</span><span class="p">(</span><span class="s">"sample"</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="nf">error</span><span class="p">(</span><span class="s">"error"</span><span class="p">)</span>
</code></pre>
<h2 id='requirements' class='heading'>Requirements</h2>

<table><thead>
<tr>
<th style="text-align: center">-</th>
<th style="text-align: center">iOS</th>
<th style="text-align: center">OSX</th>
<th style="text-align: center">tvOS</th>
<th style="text-align: center">watchOS</th>
<th style="text-align: center">XCode</th>
<th style="text-align: center">Swift</th>
<th style="text-align: center">CocoaPods</th>
<th style="text-align: center">Carthage</th>
</tr>
</thead><tbody>
<tr>
<td style="text-align: center">2.2.0+</td>
<td style="text-align: center">9.0+</td>
<td style="text-align: center">10.9+</td>
<td style="text-align: center">9.0+</td>
<td style="text-align: center">2.0</td>
<td style="text-align: center">12.0+</td>
<td style="text-align: center">5.3</td>
<td style="text-align: center">1.3.0</td>
<td style="text-align: center">0.31.0+</td>
</tr>
<tr>
<td style="text-align: center">2.1.0+</td>
<td style="text-align: center">8.0+</td>
<td style="text-align: center">10.9+</td>
<td style="text-align: center">9.0+</td>
<td style="text-align: center">2.0</td>
<td style="text-align: center">11.0+</td>
<td style="text-align: center">5.0</td>
<td style="text-align: center">1.3.0</td>
<td style="text-align: center">0.31.0+</td>
</tr>
</tbody></table>
<h2 id='installation' class='heading'>Installation</h2>

<p>*Please set up your project Swift 5.0</p>
<h3 id='cocoapods' class='heading'>CocoaPods</h3>
<pre class="highlight ruby"><code><span class="n">source</span> <span class="s1">'https://github.com/CocoaPods/Specs.git'</span>
<span class="n">use_frameworks!</span>

<span class="k">def</span> <span class="nf">import_pods</span>
<span class="n">pod</span> <span class="s1">'Logboard'</span><span class="p">,</span> <span class="s1">'~&gt; 2.2.1'</span>
<span class="k">end</span>

<span class="n">target</span> <span class="s1">'Your Target'</span>  <span class="k">do</span>
<span class="n">platform</span> <span class="ss">:ios</span><span class="p">,</span> <span class="s1">'9.0'</span>
<span class="n">import_pods</span>
<span class="k">end</span>
</code></pre>
<h3 id='carthage' class='heading'>Carthage</h3>
<pre class="highlight plaintext"><code>github "shogo4405/Logboard" ~&gt; 2.2.1
</code></pre>
<h2 id='appenders' class='heading'>Appenders</h2>
<h3 id='consoleappender' class='heading'>ConsoleAppender</h3>

<p>Use print function. You can see XCode&rsquo;s console.</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">logger</span> <span class="o">=</span> <span class="kt">Logboard</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="s">"identifier"</span><span class="p">)</span>
<span class="k">let</span> <span class="nv">console</span> <span class="o">=</span> <span class="kt">ConsoleAppender</span><span class="p">()</span>
<span class="n">logger</span><span class="o">.</span><span class="n">appender</span> <span class="o">=</span> <span class="n">console</span>
</code></pre>
<h3 id='multiappender' class='heading'>MultiAppender</h3>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">logger</span> <span class="o">=</span> <span class="kt">Logboard</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="s">"identifier"</span><span class="p">)</span>
<span class="k">let</span> <span class="nv">multi</span> <span class="o">=</span> <span class="kt">MultiAppender</span><span class="p">()</span>
<span class="n">multi</span><span class="o">.</span><span class="n">appenders</span><span class="o">.</span><span class="nf">append</span><span class="p">(</span><span class="kt">ConsoleAppender</span><span class="p">())</span>
<span class="n">multi</span><span class="o">.</span><span class="n">appenders</span><span class="o">.</span><span class="nf">append</span><span class="p">(</span><span class="kt">SocketAppender</span><span class="p">())</span>
<span class="n">logger</span><span class="o">.</span><span class="n">appender</span> <span class="o">=</span> <span class="n">multi</span>
</code></pre>
<h3 id='socketappender' class='heading'>SocketAppender</h3>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">logger</span> <span class="o">=</span> <span class="kt">Logboard</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="s">"identifier"</span><span class="p">)</span>
<span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketAppender</span><span class="p">()</span>
<span class="n">socket</span><span class="o">.</span><span class="nf">connect</span><span class="p">(</span><span class="s">"toHost"</span><span class="p">,</span> <span class="mi">22222</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">appender</span> <span class="o">=</span> <span class="n">socket</span>
</code></pre>
<h2 id='license' class='heading'>License</h2>

<p>BSD-3-Clause</p>

          </section>
        </section>
        <section id="footer">
          <p>&copy; 2020 <a class="link" href="https://github.com/shogo4405/Logboard" target="_blank" rel="external">shogo4405</a>. All rights reserved. (Last updated: 2020-11-08)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
